using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Input;  

namespace LP2
{

    class Item
    {
        protected string name;
        protected Texture2D imagen;
        protected Vector2 position;

        public Item(String nombre)
        {
            this.name=nombre;
        }

        public String getName()
        {
            return name;
        }

        public void setName(String name)
        {
            this.name=name;
        }


        public Texture2D getImagen()
        {
            return imagen;
        }

        public void setImagen(Texture2D imagen)
        {
            this.imagen = imagen;
        }

        public Vector2 getPosition()
        {
            return position;
        }

        public void setPosition(Vector2 position)
        {
            this.position = position;
        }
		
		public Boolean ClickOnMe(MouseState m)
        {
            Boolean x = false;

            if (m.LeftButton == ButtonState.Pressed)
            {
                    x = this.position.X <= m.X &&
                         this.position.X + this.imagen.Width >= m.X &&
                         this.position.Y <= m.Y &&
                         this.position.Y + this.imagen.Height >= m.Y;
            }
            return x;
        }


    }
}
